export default {
	// Global page headers: https://go.nuxtjs.dev/config-head
	head: {
		title: 'jares的博客-资深前端小白',
		htmlAttrs: {
			lang: 'en'
		},
		meta: [
			{ charset: 'utf-8' },
			{
				name: 'viewport',
				content: 'width=device-width, initial-scale=1'
			},
			{
				hid: 'keywords',
				name: 'keywords',
				content: 'html,css,js,vue,nodejs'
			},
			{
				hid: 'description',
				name: 'description',
				content: 'jares的博客-资深前端小白,html,css,js,vue,nodejs学习'
			},
			{ name: 'format-detection', content: 'telephone=no' }
		],
		link: [
			{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
			{ rel: 'stylesheet', href: '/css/style.css' },
			{ rel: 'stylesheet', href: '/css/prism.css' }
		]
	},

	// Global CSS: https://go.nuxtjs.dev/config-css
	css: [],

	// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
	plugins: [
		'@/plugins/filters.js'
	],

	proxy: {
		'/api': {
			target: process.env.BASE_URL,
			changeOrigin: true,
			pathRewrite: {
				'^/api': ''
			}
		}
	},

	axios: {
		proxy: true,
		secure: false
	},

	// Auto import components: https://go.nuxtjs.dev/config-components
	components: true,

	// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
	buildModules: [],

	// Modules: https://go.nuxtjs.dev/config-modules
	modules: ['@nuxtjs/axios', '@nuxtjs/dotenv'],

	// Build Configuration: https://go.nuxtjs.dev/config-build
	babel: {
		plugins: [
			[
				'prismjs',
				{
					languages: [
						'html',
						'css',
						'javascript',
						'php',
						'dart',
						'bash',
						'nginx',
						'sql',
						'c',
						'cpp',
						'python',
						'go',
						'java'
					],
					plugins: [
						'line-numbers',
						'show-language',
						'copy-to-clipboard'
					],
					theme: 'coy',
					css: true
				}
			]
		]
	}
}
